<?php
class game extends base{

	public function init(){
		parent::init();

		$this->gameObj = D('game_list');
	}

	public function index(){
		exit(404);
	}

	//城市列表
	public function gamelist()
	{
		$cond = "status=1";
        $result = $this->gameObj->getList($cond);
		// if($result){
		// 	foreach ($result as $key => $val) {
		// 		$games[$val['first']][] = $val;
		// 	}
		// }
		// dump($games);exit;
		//区
		// for($i=ord('A'); $i<=ord('Z'); $i++){
		// 	$zm = chr($i);
		// 	if($areas[$zm]){
		// 		$citys[$zm] = $areas[$zm];
		// 		// $city['label'] = $zm;
		// 		// $city['children'] = $areas[$zm];
		// 		$zimu[] = $zm;
		// 	}
		// }
		// // $citys[] = $citys;
		// $data['zimu'] = $zimu;
		$data['games'] = $result;
		// dump($data);exit;
		$this->renderSuccess('获取成功','',$data);
		
	}
	
}